package com.itheima;

import java.util.Scanner;

public class JieCheng {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int jc=sc.nextInt();
        int index=jieCheng(jc);
        System.out.println(index);
    }

    private static int jieCheng(int jc) {
        if(jc==1){
            return 1;
        }else{
            return jc*jieCheng(jc-1);
        }
    }
}
